/*
 * @Author: Charlie/彭旺
 * @email: 413157399@qq.com
 * @Date: 2022-06-17 15:40:26
 */
import request from '@/utils/request'

export function add(data) {
  return request({
    url: 'api/yxSystemConfig',
    method: 'post',
    data
  })
}

export function del(id) {
  return request({
    url: 'api/yxSystemConfig/' + id,
    method: 'delete'
  })
}

export function edit(data) {
  return request({
    url: 'api/yxSystemConfig',
    method: 'put',
    data
  })
}

export function get() {
  return request({
    url: 'api/yxSystemConfig?size=50',
    method: 'get'
  })
}

export function getQuery() {
  return request({
    url: 'api/manage-aggregation/config/query',
    method: 'get'
  })
}

export function getQuerybyid(params) {
  return request({
    url: 'api/manage-aggregation/config/queryById',
    method: 'get',
    params
  })
}

export function updateconfig(data) {
  return request({
    url: 'api/manage-aggregation/config/saveOrUpdate',
    method: 'post',
    data
  })
}

// 展示视频的列表以及查询

export function Tablelist(params) {
  return request({
    url: 'api/manage-aggregation/video/page',
    method: 'get',
    params
  })
}

// 展示视频的编辑

export function findlist(id) {
  return request({
    url: 'api/manage-aggregation/video/one/' + id,
    method: 'get'
  })
}

// 短视频提交人工审核
export function ManualReview(params) {
  return request({
    url: 'api/manage-aggregation/video/audit',
    method: 'get',
    params
  })
}

// 上下架
export function onOrOff(params) {
  return request({
    url: 'api/manage-aggregation/video/onOrOff',
    method: 'get',
    params
  })
}
// 广告配置
export function advert(type) {
  return request({
    url: 'api/manage-aggregation/advertising/queryByType/' + type,
    method: 'get'
  })
}

// 广告保存及修改

export function saveadvert(type, data) {
  return request({
    url: 'api/manage-aggregation/advertising/save/' + type,
    method: 'post',
    data
  })
}

export function upfile(data) {
  return request({
    url: 'api/file-center/open/file/upload',
    method: 'post',
    data
  })
}

export function test() {
  return request({
    url: 'api/open-aggregation/open/ding/testPost',
    method: 'post'
  })
}
